<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>箭头函数+对象解构</title>
    <script type="text/javascript">

        const monster={
            name:"红孩儿",
            age:200,
            skill:["红缨枪","三昧真火"]
        }

        //传统方法
        function f1(monster){
            console.log("skill=",monster.skill)
        }
        f1(monster)

        //箭头函数
        let f2=({skill})=>{  //这里{skill}表示是一个对象里面的属性
            console.log("skill= ",skill)
        }
        f2(monster)

    </script>
</head>
<body>

</body>
</html>